package com.demo.seckill.mapper;

import com.demo.seckill.entity.Seckill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 秒杀库存表 Mapper 接口
 * </p>
 *
 * @author 翌擎科技
 * @since 2021-10-26
 */
public interface SeckillMapper extends BaseMapper<Seckill> {

    int deductionNumber(@Param("seckillId") long seckillId);

    int queryNumber(@Param("seckillId") long seckillId);

    void deductionNumberOcc(@Param("seckillId") long seckillId, @Param("version") Integer version);
}
